The common use of
an alias is to substitute one word for another. In real life, a guy named John might have an alias of Jack. Whenever you call out "Hey Jack!"
John will probably turn around. This
means that John will respond to both "John" and "Jack." In game terms, it's not all that
different. Sometimes there are phrases
that you type repeatedly, or are very long and complicated. Instead of being forced to type them out
fully each time, you are given the ability to assign aliases to them. For example, assigning the alias
"sg" to "smile gneeblefurtz" will allow you to simply type
in "sg" every time you wished to smile at Gneeblefurtz. the game will recognize that "sg"
should be replaced with "smile gneeblefurtz" and it will do so
automatically. Aliases are insanely
useful, and can somewhat resemble macros.
The main difference between aliases and macros is that while macros are
invoked immediately upon pressing the appropriate function key, aliases are
typed into the command line and are fired off only when you hit return. There are other, subtle differences as well. Read the section Using Aliases below for
more information.
Aliases can be
invoked from any command, anywhere. If
the first word of the command is the alias, that alias will be fired. For example, if an event action called the
command “g” and you had “g” defined as an alias, the event action will, in turn,
fire off the commands associated with the alias “g.”
Whenever an alias
is used, the small alert light (normally invisible) to the left of the command
line in the Main Window will flash green for a moment, then fade away. This is simply the game alerting you that
you have just used an alias.
The number of
aliases that some players define can be in the hundreds. The main reason to their popularity is that
they are extremely versatile and totally customizable to your own liking. There is one caveat with alias usage though
and it must be strictly followed:
ALIAS WARNING
Be very careful when assigning alias names. You can easily overlap common commands with your alias name if you're not paying attention. For example, you might create the alias "get" as "get all" While this may seem innocent, it is NOT. Now whenever you type "get" the game will interpret that as "get all" While this is fine, what happens when you try to "get sword" is not. The game will interpret that as "get all sword" and won't know what you are trying to do, and thusly return a "What?" This seemingly simple problem can be difficult to locate if you were careless when selecting your alias name. Use the following two guidelines to help you avoid this problem
·
Try not to choose actual English words as aliases. Many are used as commands in the game and
are susceptible to alias overlapping.
·
Take a couple seconds to review your new alias choice so that you can
remember it easily and that it is relatively unique in nature
If you run into problems with commands not working that you know should be working, take a moment to review your alias list. Also, pay attention to the alias alert light. If your commands are screwing up and the light is flashing green every time you try, that is a good indication you are experiencing an alias overlap.
Aliases
Screen Elements
Aliases Grid
This grid displays
all aliases that you have created and are available for you to customize. Use the mouse or arrow keys to select the
alias you desire.
Delete Alias Button
Deletes the alias
currently selected in the grid.
This will also delete the script assigned to that alias.
Alias
Script
This script displays all commands assigned to the alias currently selected in the grid. If the script is empty, there are no commands currently assigned to that alias. You can freely edit as you like in this field. Each individual line will be read as an individual command when the alias is executed.
Script Buttons
Undo | Undo | Undoes any changes recently made to the script | |
A/M | Alias/Macro grabber | Insert an alias or macro | |
f(x) | Function grabber | Insert a function into the script | |
@ | Variable grabber | Insert a specific variable into the script | |
Eraser | Clear script | Clears the entire script |
Note: You can enter comments/remarks into scripts by using the letters "REM" (all must be uppercase) as the first three characters in the command. This basically tells Portal© to completely ignore that line.
New Alias Field
Enter a new alias
you wish to add to the grid here. Aliases
cannot contain spaces, double-quotes or begin with – (dash). Also, you cannot create an alias with the
same name as a macro (F2, F3, etc.)
Attempts to adds
the word defined in the new alias field as a new alias.
Replaces the
currently selected alias with the new alias name, retaining all the commands of
the original alias.
Close Button
Closes the Aliases
Screen.
Using
Aliases
As mentioned
before, aliases can act very similar to macros. Before using either macros or aliases, the user should read both
help sections to get a better understanding of the similarities and differences
between the two. Use the following list of points to help you understand
exactly how aliases work.
Aliases are used to
replace common/complicated phrases
In the above
example, we talked about assigning "sg" to "smile
gneeblefurtz" While this is a
simple application of an alias, it is still useful. Nobody wants to type in "smile gneeblefurtz" every time
he pops into the room - what a name!
Another example of a good alias usage would be if you were unlocking and
opening a door many times here and there.
Instead of typing "unlock door" and then "open door"
over and over, you could assign an alias.
Let's say you created an alias called "od" and then added the
following two commands to that alias: "unlock door" and "open
door" Now, whenever you type
"od" into the Command Line, the game will send "unlock door"
and "open door" just as if you typed them out yourself - very handy!
Note: Aliases are only
activated if they are the first word in the Command Line.
Text following an
alias will be appended to the interpreted alias
Let's say you had
the alias "ts" as "tell sam" You could then type in "ts hi there" and the game will
interpret that as "tell sam hi there" This only works with aliases that have only one command
associated with them. For
multiple-command aliases, use the $ variable.
The $ variable means wherever in the command you see the $, replace that
with all the text following the typed alias.
For example, say
you had the alias “ts” associated with commands “tell sam $” and “tell steve
$” Now, if you typed “ts hey! how’s it
going?” the game would read that as both “tell sam hey! how’s it going?” and
“tell steve hey! How’s it going?”
Note: You can force a $
character into the final alias string by placing a ~ in front of it. Doing so will tell the program not to
process the $ as a variable, but rather as the actual dollar-sign character
instead. This applies to all alias
instances of the $ variable.
Sometimes it is not
desirable to have all commands in an alias fire off all at once. In these cases, you can insert a delay of up
to 99 seconds between commands. To
insert a delay, simply enter the word “wait” followed by the number of seconds
of delay. For example: “wait 2” as the
2nd command would mean that the 1st command would fire off, then there would be
a 2 second delay, then the 3rd command would be invoked.
You can also insert
a random delay between commands using the “rwait” command. The format for using
rwait is exactly like the format for wait, save that the delay will be a random
number from 0 to the number given.
Using the above example, if you used “rwait 5” the 1st command would
fire off, then there would be a random delay of anywhere from 0 to 5 seconds,
then the 3rd command would be invoked.
Note: In the random
example, the delay is
randomized every time the alias is used.
Aliases can use $
variables for greater flexibility (advanced)
A very useful
aspect to aliases is the ability to use variables within the aliases
themselves. Let's take our above
"og" alias example. We have
it opening a door right now right? Ok,
let's say you wished to have a similar alias that would be used to unlock, then
open a chest instead of a door. You
could simply create another alias like "oc" but that would be
redundant. We can modify the
"od" alias to have it unlock, then open anything you desire. Instead of assigning the commands as above,
assign them as "unlock $1" and "open $1" This tells the game that you're going to be
filling those $1's on the fly, when you invoke the alias. Now, instead of typing "od" as the
alias activator, you'll now type "od door" The first word following the alias activator is assigned as the
$1 variable. This means that the game
will now replace the $1 with "door" instead. Now, typing "od door" will
"unlock door" and then "open door" just as before, but you
can also type "od chest" and the game will interpret that as
"unlock chest" and "open chest"
The usage of $#
variables can get more complex as well.
You have 5 available to you to use ($1, $2, $3, $4 and $5). Each variable is assigned according to the
words following the alias activator word.
The first word is put into $1, the second into $2 and so on. You can then use the variables however you
want in the list of commands for that alias.
For example, let's
assume you have the alias "gc" associated with the commands:
"give $1 coins to bill" "give $2 coins to john" and
"give $3 coins to pete" Now,
when you typed "gc 10 20 30" the game will interpret that as
"give 10 coins to bill" "give 20 coins to john" and
"give 30 coins to pete"
Another example would be the alias "pb" associated with the
single command "put $1 in bag $2"
If you typed in "pb sword 2" the game would interpret that as
"put sword in bag 2"
Aliases can be
reversed
This is pretty
cool. You can take an alias and run the
commands in reverse order. Not only
does this reverse the order, but it also assigns reversed values to each
command (if any). To reverse an alias,
simply add the “-“ symbol before the alias.
Using a double “—“ in front will run the commands in the reverse order
without assigning their reversed value.
Use the below alias
as an example.
Note: Defining the
reversed values is done on the Program Options Screen – Reversing Tab. For the example below, the default values
are used.
Alias move
Commands n, e, e,
enter, sw
Typed command: move
sends: n, e, e, enter, sw
Typed command: -move
sends: ne, exit, w, w, s
Alias
Examples
Aliases can get very complex very quickly. Here are some examples illustrating the
variable usage with a bit more detail.
Alias ju
Commands jump
Typed command: ju
sends: jump
Typed command: ju bob
sends: jump bob"
Typed command: ju bob joe pete
sends: jump bob joe pete
Note: Now, "jump bob joe pete" won’t end up
making much sense to the game, but it is shown here to illustrate that all
words after the alias are appended to the single command the is sent.
Alias jsk
Commands jump,
smile, kick
Typed command: jsk
sends: jump
sends: smile
sends: kick
Typed command: jsk bob
sends: jump
sends: smile
sends: kick
Note: “bob” is not appended as in the single-command alias
example. Multiple aliases do not
automatically append the text following the alias. To do so, you must use the $ variable as described below.
Using the $ Variable
$ = all words after the typed alias
Typed command: jsk bob
$ = bob
sends: jump bob
sends: smile
sends: kick bob
Note: "bob" is placed after "jump" and
"kick" but not "smile"
This is because smile does not have the $ variable in it. The $ variable can be used in single-command
aliases as well.
Alias jsk
Commands jump $,
smile, kick $
Typed command: jsk
sends: jump
sends: smile
sends: kick
Note: If you don’t enter text after the typed alias, and
the alias has a command with a $ variable in it, the variable is not sent.
Alias pb
Commands put $ in
bag
Typed command: pb sword 2
(indicating the 2nd sword you are carrying)
$ = sword 2
sends: put sword 2 in bag
Note: If a single
command alias uses either the $ or any $# variable, the text following the
typed alias is not appended automatically.
$1 = first word after typed alias, $2
= second and so on…
Alias pb
Commands put $1 in
bag $2
Typed command: pb sword 2
$1 = sword
$2 = 2
sends: put sword in bag 2
Note: This differs from
the previous example because we are using the $1 and $2 variables instead of
the $ variable. See how it changed
things?
Alias jsk
Commands jump $1,
smile $2, kick $3
Typed command: jsk bob joe pete barry
$1 = bob
$2 = joe
$3 = pete
$4 = barry
sends: jump bob
sends: smile joe
sends: kick pete